A computer system has a 36 | 您所在的位置:网站首页 › how is page size determined in virtual address space › A computer system has a 36 |
(a) A36-bit Virtual Address Space could address 2^36 bytes. The page size given is 8KB.1 KB = 1024bytes which is equalto 2^10bytes. So 8KB = 2^3x 2^10= 2^13Bytes The number of pages in the virtual address space for the page size of 8KB = 2^36/ 2^13= 2^23 (b) For 4 bytes per page table entry, the number of pages that can be referred to is 2^32pages. As each page size is now 2^13 bytes, the maximum size of addressable physical memory in this system is 2^32x 2^13= 2^45 bytes. (c) Average Process Size = 8GB, and we are having 2^33pages. One-level page table: Available Virtual Address Space = 2^23pages. We are using 4B for each Page Table Entry. Now the Page Table Size = 2^23x 4 = 2^23x 2^2= 2^25. = 33.554432 MB As it is not cost-effective, it cannot be considered. It is taking 1 in 242 times of its memory space. Two-level page table: Average Process Size = 2^33pages with 8GB data. Andthe Page Size given is 2^13pages. We can assume that the overall size of all the varying pages is 2^33Bytes. Accordingly, we now get 2^33/ 2^13= 220Pages. Here the address willbe partitioned into 12, 11, and 13. It can be shown that the size of one low-level piece of the Page Table is 2^11. Hence, it is needed 2^20/ 2^11= 2^9 The total size of the page table is : Size of the External page table = 1x2^12x2^2added with Size of the Internal Page Table = 2^9x 2^11x 2^2, we willget the result as 2^14+ 2^22which is roughly 4.210688 MB. Three-Level Page Table: Here the address willbe partitioned into 8, 8, 7, and 13. As above, it will beneeded 2^20/ 2^7= 2^13. It can be seen that the Two-level Page table would reference 2^8Three-level Page Table. Hence it will beneeded 2^13/ 2^8= 2^5Two-level pages. From the above calculations, Two-level and Three-level page table requires less space than One-level Page table. As our Virtual address space is small, and based on the cost-effectiveness, it's better to choose the Two-level Page Table. (d) Now the average size of the Page Table can be found by dividing by 3 the page size of the various levels: for the External page table: 1 x 2^8x 2^2 for the Two-level page table: 2^5x 2^8x 2^2 for the Internal page table: 2^13x 2^7x 2^2 which is roughly equivalent to 4 megabytes. |
CopyRight 2018-2019 实验室设备网 版权所有 |